from django.urls import path
# ========== 导入views文件 ==========
from basicweb.views import employee as employee_views
from basicweb.views import line as line_views
from basicweb.views import base_data as base_data_views
from basicweb.views import department as department_views
from basicweb.views import phase as phase_views
from basicweb.views import position as position_views

from basicweb.views import redis_demo as redis_views

urlpatterns = [
    # ======= 员工信息 =========
    path('employee/', employee_views.index, name="employee"),
    path('employee/list/', employee_views.list_values, name="list_employee"),
    path('employee/ch/status/', employee_views.change_employee_status, name="ch_employee_status"),

    # ======  产线信息 =========
    path('line/', line_views.get_line_data, name="get_line_data"),
    path('line/change/', line_views.change_line, name="change_line"),
    path('line/select/', line_views.get_lines_select, name="get_line_select"),

    # ======= 部门信息 ===========
    path('department/', department_views.get_department_data, name="get_department_data"),
    path('department/select/', department_views.get_department_select, name="get_department_select"),
    path('department/add/', department_views.add_value, name="add_department"),
    path('department/edit/', department_views.edit_value, name="edit_department"),
    path('department/del/', department_views.del_value, name="del_department"),

    # ======= 阶段信息 ===========
    path('phase/', phase_views.get_phase_phasecotent, name="get_phase_phasecontent_data"),
    path('phase/phasecontent/page/', phase_views.index, name="phase_phasecontent_page"),
    path('phase/phasecontent/info/', phase_views.get_phase_phasecontent_info, name="get_phase_phasecontent_info"),
    path('phase/next/', phase_views.get_next_phase, name="get_next_phase"),
    path('phase/add/', phase_views.add_phase, name="add_position_phase"),
    path('phase/del/', phase_views.del_phase, name="del_position_phase"),
    path('phase/phasecontent/add/', phase_views.add_phasecontent, name='add_position_phase_phasecontent'),
    path('phase/phasecontent/edit/', phase_views.edit_phasecontent, name='edit_position_phase_phasecontent'),
    path('phase/phasecontent/del/', phase_views.del_phasecontent, name='del_position_phase_phasecontent'),

    # ======= 职位信息 ===========
    path('position/select/', position_views.get_position_select, name="get_position_select"),
    path('position/add/', position_views.add_position, name="add_position"),
    path('position/edit/', position_views.edit_position, name="edit_position"),
    path('position/del/', position_views.del_position, name="del_position"),

    # ===== 培训基础信息 ========
    path('info/', base_data_views.index, name="base_data"),

    # =========== redis测试 ==========
    path("redis/set/", redis_views.set_redis),
    path('redis/get/', redis_views.get_redis),
    path('redis/mail/', redis_views.send_email),

]
